package high;

import java.sql.Time;
import java.util.concurrent.TimeUnit;

/**
 * NEW
 * RUNNABLE
 * TERMINATED
 * TIME_WAITTING
 * WAITTING
 * BLOCKED
 */

public class Status {
    public static void main(String[] args) throws InterruptedException {
        Thread thread =new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getState());
                System.out.println("线程开始执行了...");
            }
        });
        System.out.println(thread.getState());
        thread.start();
        TimeUnit.SECONDS.sleep(3);
        System.out.println(thread.getState());
    }
}
